<%@ tag pageEncoding="UTF-8"%>
<%@ attribute name="page" required="true" type="cn.org.rapid_framework.page.Page" description="Page.java" %>
<%@ attribute name="pageSizeSelectList" type="java.lang.Number[]" required="false"  %>
<%@ attribute name="isShowPageSizeList" type="java.lang.Boolean" required="false"  %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
	Integer[] defaultPageSizes = new Integer[]{10,15,20,25,30,40,50,100};
	if(jspContext.getAttribute("pageSizeSelectList") == null) {
		jspContext.setAttribute("pageSizeSelectList",defaultPageSizes); 
	}
	
	if(jspContext.getAttribute("isShowPageSizeList") == null) {
		jspContext.setAttribute("isShowPageSizeList",true); 
	} 
%>
<c:if test="${page.lastPageNumber>=0}">
<div class="page-navigation">
	<span>&nbsp;共&nbsp;<span>${page.totalCount}</span>&nbsp;条记录 ${page.thisPageNumber}</span>/${page.lastPageNumber}页
	<c:choose>
		<c:when test="${page.firstPage}"><a href="javascript:void(0)" style="text-decoration:none;cursor:default;color:#999;"  onclick="javascript:Milan.page.to(this, 1, '');">首页</a></c:when>
		<c:otherwise><a href="javascript:void(0)" title="首页"  onclick="javascript:Milan.page.to(this, 1, '');">首页</a></c:otherwise>
	</c:choose>
	<c:choose>
		<c:when test="${page.hasPreviousPage}"><a href="javascript:void(0)" title="上一页"  onclick="javascript:Milan.page.to(this, ${page.previousPageNumber}, '');">上一页</a></c:when>
		<c:otherwise><a href="javascript:void(0)" style="text-decoration:none;cursor:default;color:#999;">上一页</a></c:otherwise>
	</c:choose>
	
	<c:choose>
		<c:when test="${page.hasNextPage}"><a href="javascript:void(0)" title="下一页"  onclick="javascript:Milan.page.to(this, ${page.nextPageNumber}, '');">下一页</a></c:when>
		<c:otherwise><a href="javascript:void(0)" style="text-decoration:none;cursor:default;color:#999;">下一页</a></c:otherwise>
	</c:choose>
	
	<c:choose>
		<c:when test="${page.lastPage}"><a href="javascript:void(0)" style="text-decoration:none;cursor:default;color:#999;" >末页</a></c:when>
		<c:otherwise><a href="javascript:void(0)" title="末页"  onclick="javascript:Milan.page.to(this, ${page.lastPageNumber}, '');">末页</a></c:otherwise>
	</c:choose>
</div>
</c:if>
